package cn.edu.jsu.zjj.service;

import cn.edu.jsu.zjj.model.dto.user.UserLoginRequest;
import cn.edu.jsu.zjj.model.dto.user.UserQueryRequest;
import cn.edu.jsu.zjj.model.entity.OperLog;
import cn.edu.jsu.zjj.model.entity.User;
import cn.edu.jsu.zjj.model.vo.UserVO;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 用户信息表 服务类
 * </p>
 *
 * @author
 * @since 2024-05-12
 */
public interface UserService extends IService<User> {
    /**
     * 用户登录
     * @param userLoginRequest
     * @return
     */
    User login(UserLoginRequest userLoginRequest);

    /**
     * 获取当前登录用户
     *
     * @return
     */
    User getLoginUser();

    /**
     * 获取查询条件
     *
     * @param userQueryRequest
     * @return
     */
    QueryWrapper<User> getQueryWrapper(UserQueryRequest userQueryRequest);

    UserVO getUserVO(User user);

    /**
     * 导出教师数据报表
     * @param response
     */
    void exportBusinessData(HttpServletResponse response);

    OperLog setOperLog();

    List<User> selectList();

    /**
     * 检查用户的majorId是否在sys_docu_include表中存在
     * @param userMajorId
     * @return
     */
    boolean checkUserMajorId(String userMajorId);
}